<footer>
    <div class="mainBox">
        <div class="top">
            <a href="">关于我们</a><span>|</span>
            <a href="">隐私保护</a><span>|</span>
            <a href="">网站指南</a><span>|</span>
            <a href="">版权与免责声明</a><span>|</span>
            <a href="">联系我们</a>
        </div>
        <div class="fotText">
            <div class="txt">
                <div class="li">
                    <p>&#1692019 宁夏回族自治区商务厅版权所有</p>
                    <p>ICP备案号：宁ICP备05001183号-6</p>
                </div>
                <div class="li">
                    <p>网站维护：宁夏商务厅电子商务和信息中心</p>
                    <p>技术支持：中商流通生产力促进中心有限公司</p>
                </div>
            </div>
            <img src="./images/f1.png" alt="">
        </div>
    </div>
</footer>

<div class="sidebar">
    <ul>
        <li>
            <div class="main">
                <img src="./images/s1.png" alt="">
                <img class="hide" src="./images/s1-1.png" alt="">
                <span>公众号</span>
            </div>

            <div class="ewmMain">
                <img class="bg" src="./images/111.png" alt="">
                <img class="img" src="./images/ewm.png" alt="">
            </div>
        </li>
        <!-- <li>
            <div class="main">
                <img src="./images/s2.png" alt="">
                <img class="hide" src="./images/s2-2.png" alt="">
                <span>在线客服</span>
            </div>
        </li> -->
        <li id="isTop">
            <div class="main">
                <img src="./images/s3.png" alt="">
                <img class="hide" src="./images/s3-3.png" alt="">
                <span>回到顶部</span>
            </div>
        </li>
    </ul>
</div>

<script>
    $(window).scroll(function () {
        if ($(window).scrollTop() > 300) {
            $("#isTop").css('display','flex')
        }
        else {
            $("#isTop").css('display','none')
        }
    });
    $("#isTop").click(function () {
        $('body,html').animate({ scrollTop: 0 }, 1000);
        return false;
    });

    $('.sidebar li').hover(function(){
        $(this).find('.ewmMain').toggleClass('active')
    })

    $('.ewmMain').hover(function(){
        $(this).toggleClass('active')
    })

    let val = $('.hiddenVal').val()
    $('header ul li').each(function(){
        let index =  $(this).attr('data-index')
        if(val == index){
            $(this).addClass('active')
        }
       
    })

    
</script>